<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Insert title here</title>

</head>
<body>

<div class="read"
				style="height: 500px; width: 50%; margin-left: 100px; <!--background-color: white;--> ">
				<div id="read1">
					<h1 id="title"></h1>
					
				</div>
				<div id="read2" style="background-color: #F5F5F5;">
					<div>
						<p>价格：</p>
						<h2 style="color: darkred;" id="jiaqian"></h2>
					
					</div>
		       </div>
</div>

</body>
</html>
<%
		//获取上层页面传入的phoneid
		String buttonValue = request.getParameter("name");
	%>
<%-- 	<%=buttonValue %> --%>
<script>
	$(document).ready(function() {

		$.ajax({
			type : "POST", // 请求类型
			url : "../ProductPrice", // 请求的url
			data : "phoneid="+<%=buttonValue %>,// 发送的数据 使用serialize方法替代手动拼写数据串
			dataType : "json",
			success : function(data, textStatus, jqXHR) {
				$.each(data, function(index, eachVal) {
					alert(eachVal.phonename);
					var phonename = eachVal.phonename;
					var phoneprice = eachVal.phoneprice;
					alert(eachVal.phoneprice);
					document.getElementById("jiaqian").html = "eachVal.phoneprice";
					document.getElementById("title").html = "eachVal.phoneprice";
					$("#jiaqian").html(eachVal.phoneprice);
					$("#title").html(eachVal.phonename);
				});
			}
		});

		$("g").click(function() {
			$("h22").slideToggle("slow");

		});
	});
</script>
